<?php
    header('content-type:text/html;charset=utf-8');
    
    //如果没有传$_POST['week'] 就给$a赋值1 
    //如果传了, 就用传过来的值
    $a = empty($_POST['week']) ? '1' : $_POST['week'];
    
    switch($a){
        case 1:$name='p1.jpg'; break;
        case 2:$name='p2.jpg'; break;
        case 3:$name='p3.jpg'; break;
        case 4:$name='p4.jpg'; break;
        case 5:$name='p5.jpg'; break;
        case 6:$name='p6.jpg'; break;
        case 7:$name='p7.jpg'; break;
        default:
          echo '没有这天'; 
    }

    echo "<img src='./images/{$name}' />";


?>